package cn.zc.curriculum.service.controller.curriculum;


import cn.tools.core.VO.PageVO;
import cn.tools.core.base.R;
import cn.zc.curriculum.entity.VO.CurriculumMenuVO;
import cn.zc.curriculum.service.service.CurriculumMenuService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 课程目录 前端控制器
 * </p>
 *
 * @author keno
 * @since 2022-02-14
 */
@Api(tags = "学员查询课程目录")
@RestController
@RequestMapping("/curriculum")
public class CurriculumMenuController {

    @Resource
    private CurriculumMenuService curriculumMenuService;
    /**
     * 根据课程大类查询目录，用于后台创建时能第一时间查询出来
     * @param pageVO
     * @param classifyId
     * @return
     */
    @ApiOperation(value = "根据课程大类查询目录,视频，以及对应学生分数")
    @GetMapping("/find/CurriculumMenu")
    private R<Object> studentFindCurriculumMenuByClassify(PageVO pageVO, @RequestParam("classifyId") String classifyId){
        List<CurriculumMenuVO> curriculumMenuVO = curriculumMenuService.findAllCurriculumMenuByClassify(pageVO, classifyId);
        return R.success(curriculumMenuVO);
    }
}

